package com.sayai.work.tools.overtimes.dao;

import com.sayai.work.tools.overtimes.data.OtRecordsEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RecordDao extends JpaRepository<OtRecordsEntity,Integer> {

    @Query("SELECT distinct new OtRecordsEntity( idate, itype)  FROM OtRecordsEntity ")
    public List<OtRecordsEntity> findIdateItype();

    public List<OtRecordsEntity> findByIdateAndItype(String idate,String itype);

}
